﻿@{
    Layout = "_Square";
    IEnumerable<IUser> hotUsers = ViewData.Get<IEnumerable<IUser>>("hotUsers", null);
    IEnumerable<Activity> activities = ViewData.Get<IEnumerable<Activity>>("activities", null);
    Html.IncludeScript("~/Applications/Group/Scripts/jquery.spb.group.js", ResourceRenderPriority.Last);
}
@model LoginEditModel
@section Aside{
    <script src="@Tunynet.Utilities.WebUtility.ResolveUrl("~/Applications/Microblog/Scripts/tunynet/jquery.spb.microblog.List.js")" type="text/javascript"></script>
    <script src="@Tunynet.Utilities.WebUtility.ResolveUrl("~/Scripts/GJ/indexPage.js")" type="text/javascript"></script>
}
@section Banner{
        <!--banner中间大图开始-->
         <div class="twl">
    <div class="twl-ad">
        <ul id='adImageList'>
            <li style="display:">
                <a href="#" target="_blank"><img src="/images/big_bg1.jpg" /></a>
            </li>
            <li style="display: none;">
                <a href="" target="_blank"><img src="/images/big_bg2.png"></a>
            </li>
        </ul>
        <div class="twl-page adv-nav">
            <a class="signIn" set="0" title="" href="" target="_blank"><span class="twl-num">1</span></a>
            <a class="" set="1" title="" href="" target="_blank"><span class="twl-num">2</span></a>
        </div>
    </div>
</div>
       <!--banner中间大图结束-->
        <!--banner中间浮动开始-->
<div class="wrapperbanner clearfix">
    @Html.Partial("_SearchUser")
    <!--右侧开始-->
    <div class="twr fr">
        <!--未登录开始-->
        @using (Html.BeginForm("Login", "Account", FormMethod.Post, new { @class = "tn-helper-flowfix", id = "LoginId" }))
        {
            <div class="log-con">
                <p class="log-ti clearfix">爱驿站账号登录</p>
                <div class="log-tab1">
                    <table width="225" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td class="logw1"><span class="f-c3 f14">账&nbsp;&nbsp;&nbsp;号：</span></td>
                            <td class="logw2">
                                @Html.TextBoxFor(n => n.UserName, new { @class = "log-tx" })
                                @Html.ValidationMessageFor(n => n.UserName)
                            </td>
                        </tr>
                        <tr>
                            <td class="logw1"><span class="f-c3 f14">密&nbsp;&nbsp;&nbsp;码：</span></td>
                            <td class="logw2">
                                @Html.TextBoxFor(n => n.Password, new { @class = "log-tx", @type = "password" })
                                @Html.ValidationMessageFor(n => n.Password)
                            </td>
                        </tr>
                        @if (CaptchaUtility.UseCaptcha(VerifyScenarios.Login))
                        {
                            @Html.Captcha(VerifyScenarios.Login, true, "CaptchaTD")
                            @Html.HiddenFor(n => n.ReturnUrl)
                        }

                    </table>
                </div>
                <div class="log-xx">
                    @Html.Link("找回密码", SiteUrls.Instance().FindPassword(), "找回密码", new { @class = "fr" })
                    <div class="log-auto fl">
                        @Html.CheckBoxFor(n => n.RememberPassword, new { @class = "tn-checkbox" })下次自动登录
                    </div>
                </div>
                <div class="log-xx mt-10"><p class="f-c8" id="loginMsgTip"></p></div>
                <div class="log-btn"><div class="btn2 fl mr-10"><a href="javascript:;" id="loginBtn">登&nbsp;&nbsp;录</a></div><div class="btn20 fl"><a href="/account/register.aspx" target="_blank">免费注册</a></div></div>
            </div>
        }
        <!--未登录结束-->
    </div>
    <!--右侧结束-->
</div>
<!--banner中间浮动开始-->
}
<div class="twb"></div>
<!--wrapper开始-->
<div class="wrapper">
    <!--一周大热开始-->
    @Html.Action("_TopUsers", "FindUser", new { sortBy = SortBy_User.PreWeekHitTimes, topNumber = 5 })
    <!--一周大热结束-->
    <div class="icont">
        <!--左侧的左侧开始-->
        <div class="icontr">
            <!--驿站通告开始-->
            <p class="tbg1"><span class="t1 fl">驿站通告</span></p>  <!--标题-->
            <!--四个图标的时候开始-->
            <div class="alist2">
                <ul>
                    @{
                        AnnouncementService announcementService = new AnnouncementService();
                        PagingDataSet<Announcement> announcements = announcementService.Gets(9, 1);
                        if (announcements != null && announcements.Count() > 0)
                        {
                            foreach (var announcement in announcements)
                            {
                                <li>
                                    @if (announcement.IsHyperLink)
                                    {
                                        <a href="@announcement.HyperLinkUrl" title="@announcement.Subject" style="@announcement.SubjectStyle" target="_blank">@announcement.Subject</a>
                                    }
                                    else
                                    {
                                        if (announcement.EnabledDescription)
                                        {
                                            <a href="@SiteUrls.Instance().AnnouncementDetail(announcement.Id)" title="@announcement.Subject" style="@announcement.SubjectStyle" target="_blank">@announcement.Subject</a>
                                        }
                                        else
                                        {
                                            <div title="@announcement.Subject" style="@announcement.SubjectStyle">@announcement.Subject</div>
                                        }
                                    }
                                </li>
                            }
                        }
                        else
                        {
                            <li><a href="#">暂无公告</a></li>
                        }
                    }
                </ul>
            </div>
            <!--四个图标的时候结束-->
            <!--驿站通告结束-->
            <!--爱情美文开始-->
            <p class="tbg1"><span class="t1 fl">驿站动态</span></p>  <!--标题-->
            <div class="alist2">
                <ul>
                    @Html.Action("_HomeActivities", "Channel")
                </ul>
            </div>
            <!--爱情美文结束-->

        </div>
        <!--左侧的左侧结束-->
        <!--左侧的右侧开始-->
        <div class="icontl">
            <!--缘分天天开始-->
            @Html.Action("_RecommendUser", "FindUser", new { topNumber = 4 })
            <!--缘分天天结束-->
            <!--今日速配开始-->
            <p class="tbg2"><span class="t1 fl">认证会员</span></p>  <!--标题-->
            <div class="mcon2 sp1">
                <ul>
                    <!--一条记录开始-->
                    @{
                        UserService userService = new UserService();
                        IEnumerable<User> topUsers = userService.GetFindUser(true, 5) as IEnumerable<User>;

                        if (topUsers != null && topUsers.Count() > 0)
                        {
                            foreach (var temp in topUsers)
                            {
                                UserProfileService userProfileService = new UserProfileService();
                                UserProfile profile = userProfileService.Get(temp.UserId);
                                <li>
                                    <div class="sp-pho1">
                                        @Html.ShowUserAvatar(temp.UserId, AvatarSizeType.Big, true)
                                    </div>
                                    <p @*class="sp-name1"*@>ID:@(temp.UserId.ToString().Substring(temp.UserId.ToString().Length - 9)) @*@Html.Link(temp.UserId.ToString().Substring(temp.UserId.ToString().Length - 9), SiteUrls.Instance().SpaceHome(temp.UserId), temp.DisplayName, new { @class = "tn-user-name" }, HyperLinkTarget._blank)*@</p>
                                    <p>@(string.IsNullOrEmpty(temp.Profile.NowAreaCode) ? "未填写" : temp.Profile.NowAreaCode)</p>
                                    <p @*class="sp-str1"*@>@(temp.CalculateAgeCorrect(temp.Profile.Birthday, DateTime.Now))岁 &nbsp;&nbsp;@(string.IsNullOrEmpty(temp.Basecase.Height) ? "未填写" : temp.Basecase.Height + "cm")</p>
                                    <p> @(temp.Profile.EducationExperience == null || temp.Profile.EducationExperience.Count() <= 0 ? "未填写" : temp.Profile.EducationExperience.First().AsEditModel().Degree.EnumMetadataDisplay()) &nbsp;&nbsp; @(temp.Basecase == null || string.IsNullOrEmpty(temp.Basecase.Salary) ? "未填写" : temp.Basecase.Salary)</p>

                                </li>
                            }
                        }

                    }

                    <!--一条记录结束-->
                </ul>
            </div>
            <!--今日速配结束-->

        </div>
        <!--左侧的右侧结束-->

    </div>
</div>

<script>indexPage.bannerPlay();</script>
<!--wrapper结束-->
